package com.neo.pub.service.impl;

import com.neo.common.annotation.DataSource;
import com.neo.common.enums.DataSourceType;
import com.neo.pub.domain.OutPatient;
import com.neo.pub.mapper.EleCardMapper;
import com.neo.pub.service.IEleCardService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户 业务层处理
 *
 * @author tr
 */
@Service
@DataSource(value = DataSourceType.HISBAK)
public class EleCardServiceImpl implements IEleCardService {

    private static final Logger log = LoggerFactory.getLogger(EleCardServiceImpl.class);

    @Autowired
    private EleCardMapper eleCardMapper;

    /**
     * 根据条件分页查询用户列表
     *
     * @param outPatient 用户信息
     * @return 用户信息集合信息
     */
    @Override
    public List<OutPatient> selectOutPatientList(OutPatient outPatient) {
        outPatient.setEndDate(outPatient.getEndDate() + " 23:59:59");
        return eleCardMapper.getAdmissionApplicationPatient(outPatient);
    }


}
